/***********************************************
 This file is part of redia-bapps-main-ios.
 
 Copyright (c) 2015 Redia A/S
 
 Redia-bapps-main-ios is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.
 
 Redia-bapps-main-ios is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with redia-bapps-main-ios.  If not, see <http://www.gnu.org/licenses/>.
 
 *********************************************** */

//
//  BAColumnViewController.m
//  redia-bapps-ios
//
//  Created by Nikolaj Tørring on 14/04/14.
//  Copyright (c) 2014 redia. All rights reserved.
//

#import "BAColumnViewController.h"

@interface BAColumnViewController ()



@end

@implementation BAColumnViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    BA_LABEL_SET_FONT_MEDIUM(self.materialTypeLabel);
    
    [self setHiglightedTitleColor:NO];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)setHiglightedTitleColor:(BOOL)highlite
{
    /* was:
     if (highlite) {
     [self.materialLabelBackground setBackgroundColor:[BALibrarySettings instance].getCustomerColorNormal];
     } else {
     [self.materialLabelBackground setBackgroundColor:[BALibrarySettings instance].getCustomerColorDark];
     }*/
    if (highlite) {
        [self.materialLabelBackground setBackgroundColor:[UIColor colorWithWhite:0.64 alpha:1]];
    } else {
        [self.materialLabelBackground setBackgroundColor:[UIColor colorWithWhite:0.81 alpha:1]];
    }
}

-(CGRect)getTitleLabelRectConvertedToView:(UIView *)viewToConvertTo
{
    return [viewToConvertTo convertRect:CGRectMake(0, 0, self.materialTypeLabel.intrinsicContentSize.width, self.materialTypeLabel.intrinsicContentSize.height) fromView:self.materialTypeLabel];
}

@end
